package com.lahuan.demo.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.web.bind.annotation.*;

import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import lombok.RequiredArgsConstructor;
import com.lahuan.common.Result;
import com.lahuan.demo.service.OrderService;
import com.lahuan.demo.entity.Order;
import javax.validation.Valid;
import java.util.List;

/**
 * <p>
 * 订单 控制器
 * </p>
 * @author lahuan
 * @since 2021-12-15
 */
@RequiredArgsConstructor
@RestController
@Slf4j
@Api(value = "t_order", tags = "订单接口")
@RequestMapping("/demo/order")
public class OrderController {

    private final OrderService orderService;



    @ApiOperation(value = "l2 cache根据id获取l2 cache",notes="l2 cache根据id获取")
    @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long ")
    @GetMapping("/l2cache/{id}")
    public Result<Order> orderGetById(@PathVariable Long id) {
        orderService.selectById(id);
        orderService.selectById(id);

        return Result.ok(orderService.selectById(id));
    }




}
